#include "configReader.h"
#include "common.h"

int main(int argc, char **argv)
{
	int i;
	arraycontainer sectionContainer;	
	arraycontainer ruleContainer;	
	char *value;
	initConfig(argv[1]);
	getConfigSections(&sectionContainer);
	printf("\nSections - ");
	for (i = 0; i < sectionContainer.numelements; i++)
	{
		printf("[%s]\n",sectionContainer.dataarray[i]);
	}
	value = getConfigValue("folder4","SourcePath",value);
	printf("\nSourcePath - %s",value);
	getConfigRule("folder4","Rule",&ruleContainer);
	printf("\nRule - ");
	for (i = 0; i < ruleContainer.numelements; i++)
	{
		printf("%s --> ",ruleContainer.dataarray[i]," ");
	}
	printf("END\n");
	deInitConfig();
	return 0;
}
